class Solution:
    def mergeTriplets(self, triplets: list, target: list) -> bool:
        res = [False, False, False]
        for triplet in triplets:
            if triplet[0] > target[0] or triplet[1] > target[1] or triplet[2] > target[2]:
                continue
            if triplet[0] == target[0]:
                res[0] = True
            if triplet[1] == target[1]:
                res[1] = True
            if triplet[2] == target[2]:
                res[2] = True

        return res[0] and res[1] and res[2]
